package il.ac.braude.sona.ui.skeleton;

import il.ac.braude.sona.control.MainFlowControl;
import il.ac.braude.sona.database.User;
import il.ac.braude.sona.strings.Resources;

import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

public class ButtonPanel extends JPanel {

	private ActionListener mainFlowControl;
	public ButtonPanel(MainFlowControl mainFlowControl, User user) {
		this.mainFlowControl=mainFlowControl;
		addButton(Resources.Strings.CreateChangeReq);
		addButton(Resources.Strings.ViewRequestByID);
		addButton(Resources.Strings.ViewAllRequests);
	}
	public void addButton(String buttonTitle) {
		JButton button = new JButton(buttonTitle);
		button.addActionListener(mainFlowControl);
		add(button);
	}

}
